var mm = document.querySelectorAll(".nav>.nav-1>.nav2>.ol>a");
for (var i = 0; i < mm.length; i++) {
    mm[i].index = i;
    mm[i].onclick = function () {
        for (var i = 0; i < mm.length; i++) {
            mm[i].className = "";
        }
        mm[this.index].className = "niu";
    }
}


$(".mnp").mouseover(function () {
    $(this).children(".img").children("i").stop().animate({
        "top": "0px",
    }, 100)
    $(this).children(".img").children("p").stop().animate({
        "top": "0px",
    }, 100)
})
$(".mnp").mouseout(function () {
    $(this).children(".img").children("i").stop().animate({
        "top": "-285px",
    }, 100)
    $(this).children(".img").children("p").stop().animate({
        "top": "285px",
    }, 100)
})


var coo = document.querySelectorAll(".cop>span");
var bntr = document.querySelector(".bntr");
var col = document.querySelector(".col");
var bou = document.querySelector(".bou");
coo[1].onclick = function(){
    bntr.style.display = "none";
    col.style.display = "none";
    bou.style.display = "block";
}
coo[2].onclick = function(){
    col.style.display = "block";
    bou.style.display = "none";
    bntr.style.display = "none";
}
coo[3].onclick = function(){
    bntr.style.display = "none";
    col.style.display = "none";
    bou.style.display = "block";
}
coo[4].onclick = function(){
    col.style.display = "block";
    bou.style.display = "none";
    bntr.style.display = "none";
}
coo[5].onclick = function(){
    bntr.style.display = "none";
    col.style.display = "none";
    bou.style.display = "block";
}
coo[6].onclick = function(){
    col.style.display = "block";
    bou.style.display = "none";
    bntr.style.display = "none";
}
coo[7].onclick = function(){
    bntr.style.display = "none";
    col.style.display = "none";
    bou.style.display = "block";
}
coo[8].onclick = function(){
    col.style.display = "block";
    bou.style.display = "none";
    bntr.style.display = "none";
}
$(".nh").click(function () {
    $(".bntr").css({
        "display": "block",
    })
    $(".bou").css({
        "display": "block",
    })
    $(".col").css({
        "display": "block",
    })
})

$(window).on("scroll", function () {
    if ($(window).scrollTop() <= 1000) {
        $(".fx").css({
            "display": "none"
        })
    } else {
        $(".fx").css({
            "display": "block"
        })
    }
})
$(".fx").click(function () {
    $("body,html").stop().animate({
        scrollTop: 0
    })
});


$('.side-buttom').hover(function() {
    $('#center').css({
        "visibility": "visible",
        "left": -92,
    })
},
function() {
    $('#center').css({
        "left": -121,
        "visibility": "hidden",
    })

})


$(".side-oul>li").each(function(index, ele) {
$(ele).hover(function() {
        $($(ele).children().eq(1)).css({
            "visibility": "visible",
            "left": -92,
        })
    },
    function() {
        $($(ele).children().eq(1)).css({
            "left": -121,
            "visibility": "hidden",
        })
    })
})
$(".side-oul>div").each(function(index, ele) {
    $(ele).hover(function() {
            $($(ele).eq(0).eq(1)).css({
                "visibility": "visible",
                "left": -92,
            })
        },
        function() {
            $($(ele).eq(0).eq(1)).css({
                "left": -121,
                "visibility": "hidden",
            })
        })
})
// 回顶部
$('.hdingbu').click(function() {
$('body,html').animate({
    scrollTop: 0,
})
})

var label = document.querySelector("label")
var qizhi = 0
label.onclick = function () {
    if (qizhi == 0) {
        this.style.background = "url(./images/dianpujie/checkbox_12x12.png) 0 2px no-repeat"
        qizhi = 1
    } else if (qizhi == 1) {
        this.style.background = "url(./images/dianpujie/checked_solid_12x12.png) 0 2px no-repeat"
        qizhi = 0
    }
}
$(".abc").click(function(){
    $(".pb").css({
        "display":"block"
    })
})


$(".pb-hd i").click(function(){
    $(".pb").css({
        "display":"none"
    })
})